﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Popup_RequisitionPurchase.aspx.cs"
    Inherits="SAP.Popup_RequisitionPurchase" %>

<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="/js/jquery-1.4.3.min.js"></script>
    <script type="text/javascript" src="/js/main.js"></script>
    <%-- <link href="../skin/skin.css" rel="stylesheet" type="text/css" />--%>
    <style type="text/css">
   
     
        * { margin: 0; padding: 0; }
        .style2
        {
        }
        .style6
        {
            width: 175px;
        }
        .style7
        {
            height: 17px;
        }
        .style10
        {
            width: 175px;
            height: 17px;
        }
        .style11
        {
            width: 141px;
        }
        .style12
        {
            width: 220px;
        }
        .style13
        {
            width: 220px;
        }
        .style14
        {
            width: 160px;
            height: 17px;
        }
        .style15
        {
            width: 160px;
        }
        .style16
        {
            width: 157px;
        }
        .style17
        {
            width: 166px;
        }
        </style>
</head>
<body>

    <form id="form1" runat="server" style="height:" >
    <asp:ScriptManager ID="ScriptManagerEditItem" runat="server" EnablePartialRendering="true">
     

    </asp:ScriptManager>
    <asp:UpdatePanel ID="editItemUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="True">       
        <ContentTemplate>
            <asp:ImageButton ID="ibt_Print" runat="server" 
                ImageUrl="~/skin/images/SAP_Print.png" OnClientClick="PrintReport();" />
            <br />
            <table style="width:100%;">
             <tr>
                    <td class="style7" align="center" colspan="2">
                        <asp:Label ID="lb_Company" runat="server" Font-Bold Text="."></asp:Label>
                        </td>
                    <td class="style12"  align="center"  rowspan="5">
                        <asp:Image ID="Image1" runat="server" 
                            ImageUrl="~/skin/images/CustomerLogo.png" Height="72px" Width="92px" />
                    </td>
                    <td class="style14">
                    </td>
                    <td class="style7">
                       </td>
                </tr>
                <tr>
                    <td class="style2" align="center" colspan="2">
                        <b>Purchase Request</b></td>
                    <td class="style15">
                        <font size="2">PR#</font></td>
                    <td>
                        <asp:Label ID="lb_PRNo" runat="server" Font-Size="10pt" Text="no"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td >
                        <font size="2">Depart</font></td>
                    <td class="style10">
                        <asp:Label ID="lb_Depart" runat="server" Text="Label" Font-Size="10"></asp:Label>
                       </td>
                    <td class="style14">
                        <font size="2">Date:</font></td>
                    <td class="style7">
                        <asp:Label ID="lb_RequestDate" runat="server" Text="Label" Font-Size="10"></asp:Label>
                       </td>
                </tr>
                 <tr>
                    <td class="style11">
                        <font size="2">Store</font></td>
                    <td class="style6">
                        <asp:Label ID="lb_Store" runat="server" Text="Label" Font-Size="10"></asp:Label>
                       </td>
                     <td class="style15">
                         <font size="2">Delivery:</font></td>
                    <td>
                        <asp:Label ID="lb_PostingDate" runat="server" Text="Label" Font-Size="10"></asp:Label>
                       </td>
                </tr>
                 <tr>
                    <td class="style11">
                        <font size="2">Status</font></td>
                    <td class="style6">
                        <asp:Label ID="lb_Status" runat="server" Text="Label" Font-Size="10"></asp:Label>
                       </td>
                     <td class="style15">
                         &nbsp;</td>
                    <td>
                       </td>
                </tr>
                <tr>
                    <td class="style11">
                        &nbsp;</td>
                    <td class="style6">
                        &nbsp;</td>
                    <td class="style13">
                        &nbsp;</td>
                    <td class="style15">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>

            </div>
<%--             style="overflow:auto"--%>
                        <div>
			<asp:ListView ID="lvContents" runat="server" ViewStateMode="Enabled">
                                <LayoutTemplate>
                                    <table style="border:1px solid black; border-collapse:collapse;">
                                        <tr>
                                            <th style="width: 40px; border:1px solid black">
                                                <span><font size="2"></font></span>
                                            </th>
                                            <th style="width: 100px; border:1px solid black" colspan="2">
                                                <span><font size="2"></font></span>
                                            </th>
                                            <th style="width: 100px; border:1px solid black" colspan="2">
                                                <span><font size="2">Last Order</font></span>
                                            </th>
                                            <th style="width: 100px; border:1px solid black" colspan="3">
                                                <span><font size="2">Order Request</font></span>
                                            </th>
                                          
                                        </tr>
                                        <tr>
                                           
                                            <th style="width: 40px; border:1px solid black">
                                                <span>#</span>
                                            </th>

                                            <th style="width: 100px; border:1px solid black">
                                                <span><font size="2">Item Code</font></span>
                                            </th>
                                            <th style="width: 300px; border:1px solid black">
                                                <span><font size="2">Item Name</font></span>
                                            </th>
                                            <th style="width: 200px; border:1px solid black">
                                                <span><font size="2">Suplier Name</font></span>
                                            </th>
                                            <th style="width: 100px; border:1px solid black">
                                                <span><font size="2">Price</font></span>
                                            </th>
                                            <th style="width: 100px; border:1px solid black">
                                                <span><font size="2">Unit</font></span>
                                            </th>
                                            <th style="width: 50px; border:1px solid black">
                                                <span><font size="2">Quantity</font></span>
                                            </th>
                                            <th style="width: 80px; border:1px solid black">
                                                <span><font size="2">Whse</font></span>
                                            </th>
                                           
                                        </tr>
                                        <tr id="itemPlaceholder" runat="server">
                                        </tr>
                                    </table>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <tr>
                                       
                                        <td Style="text-align: left; border:1px dotted black;">
                                            <asp:Label runat="server" ID="lblNo"><font size="2"><%#Eval("No")%></font></asp:Label>
                                        </td>
                                        <td Style="text-align: left; border:1px dotted black;">
                                            
                                            <asp:Label runat="server" ID="lblCode"><font size="2"><%#Eval("ItemCode") %></font></asp:Label>
                                        </td>
                                        <td Style="text-align: left; border:1px dotted black;">
                                            <asp:Label runat="server" ID="lblDescription" ><font size="2"><%#Eval("Dscription")%></font></asp:Label>
                                        </td>

                                        <td Style="text-align: left; border:1px dotted black;">
                                            <asp:Label runat="server" ID="lblSupplier" ><font size="2"><%#Eval("CardName")%></font></asp:Label>
                                        </td>

                                        <td Style="text-align: right; border:1px dotted black;">
                                            <asp:Label runat="server" ID="lblPrice" ><font size="2"><%#Eval("PriceAfVAT")%></font></asp:Label>
                                        </td>

                                        <td Style="text-align: left; border:1px dotted black;">
                                            <asp:Label runat="server" ID="lbUnit" ><font size="2"><%#Eval("invntryuom")%></font></asp:Label>
                                        </td>
                                        <td Style="text-align: right; border:1px dotted black;">
                                            <asp:Label runat="server" ID="lblQuantity" ><font size="2"><%# Eval("Quantity") %></font></asp:Label>
                                        </td>
                                        <td Style="text-align: left; border:1px dotted black;">
                                            <asp:Label runat="server" ID="lblWhse"><font size="2"><%#Eval("WhsCode")%></font></asp:Label>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblNo" runat="server" Text='<%# Bind("No") %>' />
                                        </td>

                                        <td>

                                            <asp:Label ID="lblCode" runat="server" Text='<%# Bind("ItemCode") %>' />
                                            <asp:HyperLink ID="linkItems" NavigateUrl='<%# String.Format("javascript:Main.openDialog(\"../Popup_EditItem.aspx\",{0})", "\"id=" + Eval("No").ToString()+"\"")%>'
                                                runat="server"> <asp:Image ID="imgItems" runat="server" ImageUrl="~/skin/images/item-pointer.gif" /></asp:HyperLink>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblDescription" runat="server" Text='<%# Bind("Dscription")%>' />
                                        </td>
                                        <td>
                                            <asp:Label ID="lbUnit" runat="server" Text='<%# Bind("invntryuom")%>' />
                                        </td>

                                        <td>
                                            <asp:TextBox ID="txtQuantity" Style="text-align: right" runat="server" Text='<%#Eval("Quantity")%>' />
                                        </td>
                                        <td>
                                            <asp:Label runat="server" ID="lblWhse" Text='<%#Bind("WhsCode")%>' />
                                            
                                        </td>
                                    </tr>
                                </EditItemTemplate>
                               
                                <EmptyDataTemplate>
                                    <table class="data_table">
                                        <tr>

                                            <th>
                                                <span>#</span>
                                            </th>
                                            <th>
                                                <span>Item Code</span>
                                            </th>
                                            <th>
                                                <span>Item Name</span>
                                            </th>
                                             <th>
                                                <span>Supplier</span>
                                            </th>
                                             <th>
                                                <span>Price</span>
                                            </th>
                                            <th>
                                                <span>Unit</span>
                                            </th>
                                            <th>
                                                <span>Order</span>
                                            </th>
                                            
                                            <th>
                                                <span>Whse</span>
                                            </th>
                                            
                                           
                                        </tr>
                                        <tr>
                                            <td colspan="6">
                                                <span>No Data</span>
                                            </td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                            </asp:ListView>
            </div>

            <table style="width:100%;">
                <tr>
                    <td class="style17">
                        &nbsp;</td>
                    <td class="style6">
                        &nbsp;</td>
                    <td class="style16">
                        &nbsp;</td>
                    <td class="style15">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style17">
                        &nbsp;</td>
                    <td class="style6">
                        &nbsp;</td>
                    <td class="style16">
                        &nbsp;</td>
                    <td class="style15">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style17">
                        &nbsp;</td>
                    <td class="style6">
                        &nbsp;</td>
                    <td class="style16">
                        &nbsp;</td>
                    <td class="style15">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style17">
                        &nbsp;</td>
                    <td class="style6">
                        &nbsp;</td>
                    <td class="style16">
                        &nbsp;</td>
                    <td class="style15">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style17" align=center>
                        Head Department</td>
                    <td class="style6" align=center>
                        Purchasing Manager</td>
                    <td class="style16" align=center>
                        Financial Controller</td>
                    <td class="style15" align=center>
                        General Manager</td>
                    <td align=center>
                        Managing Director</td>
                </tr>
                <tr>
                    <td class="style17">
                        Date:</td>
                    <td class="style6">
                        Date:</td>
                    <td class="style16">
                        Date:</td>
                    <td class="style15">
                        Date:</td>
                    <td>
                        Date:</td>
                </tr>
            </table>
        </ContentTemplate>
        <Triggers>
           
        </Triggers>
    </asp:UpdatePanel>
    
    </form>

    <script language="javascript" >

         function PrintReport() {
             var bt = document.getElementById('<%=ibt_Print.ClientID %>');
             bt.style.visibility = "hidden";
             print();
             javascript:Main.cancelDialogClick();
        }
     </script>
</body>
</html>
